<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;
use App\Model\AuthRole;
use Hyperf\Database\Model\SoftDeletes;

class User extends Model
{
    use SoftDeletes;

    const STATUS_SHOW = 1;
    const STATUS_HIDE = 0;

    protected ?string $table = 'system_user';
    public function role()
    {
        return $this->hasOne(AuthRole::class, 'id', 'roles_ids')->select('id','name','pid','is_admin','status','is_statistical');
    }
}
